/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import org.hibernate.HibernateException;
import pojos.Login;


/**
 *
 * @author Usuario
 */
public class LoginDao extends AbstractDao{

    public int createLogin(Login login){
        int save=0;
        try{
            startOperation();
            save =(Integer) getSession().save(login);
            getTransaction().commit();
        }catch(HibernateException he) {
            handleException(he);
            throw he;
        } finally {
            super.closeSession();
        }
        return save;
    }
}
